﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using RayDen.SceneLab.Controllers.FormControllers;

namespace RayDen.SceneLab
{
    public partial class AppForm : Form
    {
        public MainFormController Controller;

        public AppForm()
        {
            InitializeComponent();

            this.Controller = new MainFormController(this);
            lblMemory.Text = string.Format("Used Memory {0} Bytes", ApplicationContext.Instance.Application.UsedMemory);
        }

        private void quitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ApplicationContext.Instance.Application.Quit();
        }

        private void logToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Controller.ShowLog();
        }

        private void configurationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Controller.ShowSettings();
        }

        private void openRDFToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFrameDialog.ShowDialog(this) == DialogResult.OK)
            {
                this.Controller.FrameController.OpenFrame(openFrameDialog.FileName);
            }
        }

        private void AppForm_Load(object sender, EventArgs e)
        {
            //new UI.ColorEditForm().Show(this);
        }

        private void imageEditorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Controller.ShowEditor();
        }

        private void imagToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void solidTexturesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Controller.ShowSolids();

        }

        private void materialsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Controller.ShowMaterialEditor();
        }
    }
}
